<div>
<div style="float:left; ">
	<?php echo $total_sitemaps ?>  sitemap left
</div>
<?php if ($total_sitemaps > 0){?>
	<div id="generate_btn" style="float:left; margin-left: 20px; margin-top: -5px;">
		<input type="button" value="Generate next sitemap xml" onclick="generateNextXml()">
	</div>
<?php 
}
?>
</div>



<script>
function generateNextXml (){

	var php_url = '<?php echo url_for('sitemap/generateXml?directory_id=')?>';
	var directory_id = document.getElementById('sl_master_directory').value;
	php_url = php_url.concat(directory_id);	

	$("#generate_btn").hide();
	
	$.ajax({type: 'POST', url:php_url, script:true, cache:false, 
		success: function(data) { 
			 $('#sitemaps_info').html(data);
			} });
	
}
</script>
